import request from './request'

// 渲染
export const getUsers = (params) => request.get(`/users`,{params});
// 添加
export const addUsers = (params) => request.post(`/users`,params);
// 状态修改
export const changeSwitch = (uid,type) => request.put(`/users/${uid}/state/${type}`);
// 删除
export const delUsers = (id) => request.delete(`/users/${id}`);
// 搜索
export const searchUsers = (id) => request.get(`/users/${id}`);
// 修改
export const changeUsers = (id,params) => request.put(`/users/${id}`,params);
// 编辑角色
export const setRoles = (id,rid)=>request.put(`/users/${id}/role`,{rid});